<template>
  <div class="outside-the-box">
    <div class="personnel">
      <header>
        所有用户
      </header>
      <div class="user-card">
        <operation></operation>
        <personnel-table class="personnel-table"></personnel-table>
        <personnel-table-pagination class="personnel-table-pagination"></personnel-table-pagination>
      </div>
    </div>
  </div>

</template>

<script>
import Operation from "./operation";
import PersonnelTable from "./table";
import PersonnelTablePagination from "./pagination";

import login from "@/api/login.js";
import user from "@/api/user";

export default {
  name: "personnel-admin",
  components: {
    Operation,
    PersonnelTable,
    PersonnelTablePagination
  },
  async mounted() {
    await user.getTableData({ pageNumber: 1 }).then(res => {
      this.$store.commit("personnel/CHANGE_USER_LIST", res);
    });
  }
};
</script>

<style>
.personnel {
  width: 84%;
  margin: 40px auto 0;
  border: 1px solid #d5dce6;
  box-shadow: 0 0 10px 0 rgba(226, 230, 239, 0.5);
}
.personnel header {
  height: 60px;
  background: #f5f7f9;
  border-bottom: 1px solid #d5dce6;
  font-size: 18px;
  line-height: 60px;
  padding-left: 32px;
}
.personnel-table-pagination {
  margin: 20px auto 0;
}
.user-card {
  background: #fff;
  padding: 30px 32px 32px;
}
.personnel-table {
  margin-top: 32px;
}
</style>
